# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=payloadmask
pkgver=17.58e0525
pkgrel=1
pkgdesc='Web Payload list editor to use techniques to try bypass web application firewall.'
groups=('blackarch' 'blackarch-webapp')
arch=('x86_64' 'aarch64')
url='https://github.com/CoolerVoid/payloadmask'
license=('GPL3')
makedepends=('git')
source=("git+https://github.com/CoolerVoid/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"
  install -dm 755 "$pkgdir/usr/share/doc/$pkgname"

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  cp -a README.md doc/* "$pkgdir/usr/share/doc/$pkgname/"
  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/payloads/" payloads/*
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

